.TH std::atomic_load,std::atomic_load_explicit 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic_load,std::atomic_load_explicit \- std::atomic_load,std::atomic_load_explicit

.SH Synopsis
   Defined in header <atomic>
   template< class T >                                           \fB(1)\fP \fI(since C++11)\fP
   T atomic_load( const std::atomic<T>* obj ) noexcept;
   template< class T >                                           \fB(2)\fP \fI(since C++11)\fP
   T atomic_load( const volatile std::atomic<T>* obj ) noexcept;
   template< class T >

   T atomic_load_explicit( const std::atomic<T>* obj,            \fB(3)\fP \fI(since C++11)\fP

                           std::memory_order order ) noexcept;
   template< class T >

   T atomic_load_explicit( const volatile std::atomic<T>* obj,   \fB(4)\fP \fI(since C++11)\fP

                           std::memory_order order ) noexcept;

   1,2) Atomically obtains the value pointed to by obj as if by obj->load().
   3,4) Atomically obtains the value pointed to by obj as if by obj->load(order).
   If order is one of std::memory_order_release and std::memory_order_acq_rel, the
   behavior is undefined.

.SH Parameters

   obj   - pointer to the atomic object to modify
   order - the memory synchronization ordering for this operation

.SH Return value

   The value that is held by the atomic object pointed to by obj.

.SH See also

   load                  atomically obtains the value of the atomic object
                         \fI(public member function of std::atomic<T>)\fP
   atomic_store          atomically replaces the value of the atomic object with a
   atomic_store_explicit non-atomic argument
   \fI(C++11)\fP               \fI(function template)\fP
   \fI(C++11)\fP
   memory_order          defines memory ordering constraints for the given atomic
   \fI(C++11)\fP               operation
                         \fI(enum)\fP

   std::atomic_load(std::shared_ptr)          specializes atomic operations for
   std::atomic_load_explicit(std::shared_ptr) std::shared_ptr
   (deprecated in C++20)                      \fI(function template)\fP
   (removed in C++26)
   C documentation for
   atomic_load,
   atomic_load_explicit
